package com.jie.pojo;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;

import java.time.LocalDateTime;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 曾豪杰
 * @Date: 2022/09/11/17:57
 * @Description:评论
 */
@Data
@TableName("comment")
public class Comment {
    @TableId
    private Long id;//id
    private String nickName;//名字
    private String email;//邮箱
    private String content;//内容
    private String picture;//头像
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;//创建时间
    @TableField(exist = false)
    private Blog blog;//博客
    @TableField(exist = false)
    private LocalDateTime updateTime;//修改时间
    private Long parentCommentId;//父评论id
    private Long blogId;//博客id
    @TableField(exist = false)
    private List<Comment> replyComment;//回复评论
    @TableField(exist = false)
    private Comment parentComment;//父评论
    private Integer admin;//是否管理员
}
